#include <stdio.h>
#include <stdlib.h>

int function_gcd(int a, int b)
{
	int max = 0, min = 0, tmp = 0;
	max = (a > b) ? a : b;
	min = (a < b) ? a : b;
	tmp = max % min;
	if (tmp == 0)
		return min;
	function_gcd(min, tmp);
}

int function_1(int a, int b)
{
	int max = 0, min = 0, i = 0;
	max = (a > b) ? a : b;
	min = (a < b) ? a : b;
	i = max;
	while (1)
	{
		if ((i%max == 0) && (i%min == 0))
		{
			break;
		}
		i++;
	}
	return i;
}

int function_2(int a, int b)
{
	int tmp =0;
	tmp = function_gcd(a, b);
	return a * b / tmp;
}

int main()
{
	int a, b;
	printf("please input a!\n");
	scanf("%d", &a);
	printf("please input b!\n");
	scanf("%d", &b);
	printf("the min bs: %d\n", function_1(a, b));
	printf("the min bs: %d\n", function_2(a, b));
	return 0;
}
